package cn.xiaobai.test;

import cn.xiaobai.annotaion.EventSubscriber;
import cn.xiaobai.annotaion.OnEvent;
import cn.xiaobai.annotaion.OnSubscribe;
import cn.xiaobai.annotaion.OnUnsubscribe;

/**
 * @Author yangdaji
 * @Date 2023/11/2
 * @PackageName cn.xiaobai.test
 * @ClassName RedisClient
 */
@EventSubscriber(topics = {"test","test2"})
public class RedisClient {


    @OnEvent
    public void onMessage(String message) {
        System.out.println("接收到消息:" + message);
    }

    @OnSubscribe
    public void onSub(String channel) {
        System.out.println("订阅频道:" + channel);
    }

    @OnUnsubscribe
    public void unSub(String channel) {
        System.out.println("频道关闭: " + channel);
    }
}
